<?php
/**
 * Created by PhpStorm.
 * User: 554665488
 * Date: 2018-6-8
 * Time: 0:32
 * @description:
 * @Author: yfl
 * @QQ 554665488
 */

/**
 * Class Database
 * @description:链式操作
 * @time:2018年6月8日00:33:36
 * @Author: yfl
 * @QQ 554665488
 */
class Database
{
    public function where($where)
    {
        return $this;
    }

    public function page($index, $size)
    {
        return $this;
    }

    public function order($field, $order)
    {
        return $this;
    }

    public function select()
    {
        return $this;
    }
}

$db = new Database();
$sql=$db->where('status=1')->where('name=a')->page(1,2)->order('id','desc')->select();
var_dump($sql);